package com.article.service.impl;

import java.util.List;

import com.article.dao.ITreeNodeDAO;
import com.article.entity.TreeNode;
import com.article.service.ITreeNodeService;

@SuppressWarnings("unchecked")
public class TreeNodeServiceImpl implements ITreeNodeService {

	private ITreeNodeDAO treeNodeDAOImpl;

	public List<TreeNode> findByParentId(String node) {
		System.out.println("node:" + node);
		//判断父节点id是否为空
		if (null == node || "".equals(node)) {
			return null;
		}
		return treeNodeDAOImpl.findByParent(Integer.parseInt(node));
	}

	public void setTreeNodeDAOImpl(ITreeNodeDAO treeNodeDAOImpl) {
		this.treeNodeDAOImpl = treeNodeDAOImpl;
	}

}
